import { BasePlugin } from "./BasePlugin";
import { PublishApkUtil } from "../util/PublishApkUtil";

/**
 * 打apk包
 * @author 赵占涛
 */
export class PublishApk extends BasePlugin {
    getName(): string {
        return "打apk包";
    }
    getDesc(): string {
        return "打apk包 传入平台名 debugso，如果传入了debugso则为debug的so，否则为release的so";
    }
    do(args: string[], cb: () => void): void {
        let ndkMode: "release" | "debug" = "release";
        if (args[1] == "debugso") {
            ndkMode = "debug"
        }
        console.log("ndkMode", ndkMode);
        PublishApkUtil.exec(args[0], ndkMode, () => {
            console.log("publish apk ok");
            cb();
        })
    }


}